package com.di.base.controller;


import com.di.base.service.AccountTblService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


/**
 * (AccountTbl)表控制层
 *
 * @author makejava
 * @since 2025-07-08 22:45:15
 */

@Slf4j
@RestController
@RequestMapping("account")
public class AccountTblController{

    @Resource
    private AccountTblService accountTblService;

    @GetMapping("/decrease")
    public void decrease(@RequestParam String userId, @RequestParam Double amount) {
        log.info("收到账户扣减请求，userId={}，amount={}", userId, amount);
        accountTblService.prepareDecreaseAccount(null,userId, amount);
    }
}

